import React from "react";

import TakeBack from "./components/TakeBack";
import NextNodeHandler from './components/NextNodeHandler';
import Reissue from './components/Reissue';


const NodeConfig = (props) => {

  const {nodeConfigType} = props;


  return (
    <>
      {nodeConfigType === 'terminateProcess' ? <TakeBack {...props} titleText="关闭流程" /> : null}
      {nodeConfigType === 'takeBack' ? <TakeBack {...props} titleText="拿回" /> : null}
      {nodeConfigType === 'nextNodeHandler' ? <NextNodeHandler {...props} /> : null}
      {nodeConfigType === 'reissue' ? <Reissue {...props} /> : null}
      {nodeConfigType === 'addSignature' ? <TakeBack {...props} titleText="加签" /> : null}
      {nodeConfigType === 'delegate' ? <TakeBack {...props} titleText="委派" /> : null}
      {nodeConfigType === 'transfer' ? <TakeBack {...props} titleText="转办" /> : null}
      {nodeConfigType === 'rollbackToPre' ? <TakeBack {...props} titleText="退回到上一节点" /> : null}
      {nodeConfigType === 'rollbackToFirst' ? <TakeBack {...props} titleText="退回到第一个节点" /> : null}
    </>
)

}

export default NodeConfig;
